package frank.zou;

import javax.servlet.http.HttpServletRequest;

import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.xwork.ActionSupport;

public class SignonBaseAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1233845493187053850L;

	/**
	 * 
	 */
	private String contextPath;

	/**
	 * 
	 * @return
	 */
	public String getContextPath() {
		if (contextPath == null) {
			contextPath = getContextPath(ServletActionContext.getRequest());
		}
		return contextPath;
	}

	/**
	 * 
	 * @param request
	 * @return
	 */
	public String getContextPath(HttpServletRequest request) {
		return request == null ? "" : request.getContextPath();
	}

}
